
<%@ page import="com.mastercard.labs.Deal" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'deal.label', default: 'Deal')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-deal" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-deal" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list deal">
			
				<g:if test="${dealInstance?.categories}">
				<li class="fieldcontain">
					<span id="categories-label" class="property-label"><g:message code="deal.categories.label" default="Categories" /></span>
					
						<g:each in="${dealInstance.categories}" var="c">
						<span class="property-value" aria-labelledby="categories-label"><g:link controller="category" action="show" id="${c.id}">${c?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.description}">
				<li class="fieldcontain">
					<span id="description-label" class="property-label"><g:message code="deal.description.label" default="Description" /></span>
					
						<span class="property-value" aria-labelledby="description-label"><g:fieldValue bean="${dealInstance}" field="description"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.detailUrl}">
				<li class="fieldcontain">
					<span id="detailUrl-label" class="property-label"><g:message code="deal.detailUrl.label" default="Detail Url" /></span>
					
						<span class="property-value" aria-labelledby="detailUrl-label"><g:fieldValue bean="${dealInstance}" field="detailUrl"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.endDate}">
				<li class="fieldcontain">
					<span id="endDate-label" class="property-label"><g:message code="deal.endDate.label" default="End Date" /></span>
					
						<span class="property-value" aria-labelledby="endDate-label"><g:formatDate date="${dealInstance?.endDate}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.imageUrl}">
				<li class="fieldcontain">
					<span id="imageUrl-label" class="property-label"><g:message code="deal.imageUrl.label" default="Image Url" /></span>
					
						<span class="property-value" aria-labelledby="imageUrl-label"><g:fieldValue bean="${dealInstance}" field="imageUrl"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.location}">
				<li class="fieldcontain">
					<span id="location-label" class="property-label"><g:message code="deal.location.label" default="Location" /></span>
					
						<span class="property-value" aria-labelledby="location-label"><g:fieldValue bean="${dealInstance}" field="location"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.merchant}">
				<li class="fieldcontain">
					<span id="merchant-label" class="property-label"><g:message code="deal.merchant.label" default="Merchant" /></span>
					
						<span class="property-value" aria-labelledby="merchant-label"><g:link controller="merchant" action="show" id="${dealInstance?.merchant?.id}">${dealInstance?.merchant?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.price}">
				<li class="fieldcontain">
					<span id="price-label" class="property-label"><g:message code="deal.price.label" default="Price" /></span>
					
						<span class="property-value" aria-labelledby="price-label"><g:fieldValue bean="${dealInstance}" field="price"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.startDate}">
				<li class="fieldcontain">
					<span id="startDate-label" class="property-label"><g:message code="deal.startDate.label" default="Start Date" /></span>
					
						<span class="property-value" aria-labelledby="startDate-label"><g:formatDate date="${dealInstance?.startDate}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.tags}">
				<li class="fieldcontain">
					<span id="tags-label" class="property-label"><g:message code="deal.tags.label" default="Tags" /></span>
					
						<span class="property-value" aria-labelledby="tags-label"><g:fieldValue bean="${dealInstance}" field="tags"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${dealInstance?.title}">
				<li class="fieldcontain">
					<span id="title-label" class="property-label"><g:message code="deal.title.label" default="Title" /></span>
					
						<span class="property-value" aria-labelledby="title-label"><g:fieldValue bean="${dealInstance}" field="title"/></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${dealInstance?.id}" />
					<g:link class="edit" action="edit" id="${dealInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
